
$(function() {

    $('.modify').on('click', function (event) {
        event.preventDefault();

        $('#myModal').on('show.eui.modal', function () {
            console.log('模态框显示');
        });

        $('#myModal').on('hide.eui.modal', function () {
            console.log('模态框关闭');
        });

        // $('#myModal').modal('show');

        $('#myModal').modal({
            wrapClassName: '.customer-class',
            width: '720',
            title: '修理厂账号编辑',
            footer: 1,
            okText: '确定',
            cancelText: '取消',
            closable: 1,
            maskClosable: 1,
            escClosable: 1,
            confirmLoading: 1,
            onOk: function () {
                // console.log('确定按钮');

                return function (dtd) {
                    var tasks = function () {
                        console.log('异步的确定按钮');
                        dtd.resolve();
                    };
                    setTimeout(tasks, 2000);
                    return dtd.promise();
                };

            },
            onCancel: function () {
                console.log('取消按钮');
            }
        });
    });



});
